kubectl create -f https://ghproxy.net/raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/crd.yaml

export namespace="tikv"
export app_name="tidb-operator"
export helm="pingcap/tidb-operator"
# export version="v1.4.5"
# [2]安装 TiDB Operator
# kubectl create namespace tidb-admin
helm upgrade --create-namespace --install \
  -n $namespace $app_name $helm \
  --set scheduler.create=true \
  --set scheduler.kubeSchedulerImageName=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler
# --set operatorImage=registry.cn-beijing.aliyuncs.com/tidb/tidb-operator:${version} \
# --set tidbBackupManagerImage=registry.cn-beijing.aliyuncs.com/tidb/tidb-backup-manager:${version}
# --set version=${version}

kubectl create ns tikv
kubectl -n tikv apply -f https://ghproxy.net/raw.githubusercontent.com/pingcap/tidb-operator/master/examples/basic-cn/tidb-cluster.yaml

export TIKV_URL=tikv://basic-pd.tikv:2379
helm repo add surrealdb https://helm.surrealdb.com
helm repo update surrealdb
helm upgrade --create-namespace --install \
  -n tikv surrealdb-tikv surrealdb/surrealdb \
  --set surrealdb.path=${TIKV_URL} \
  --set surrealdb.auth=false \
  --set image.tag=nightly \
  -f values.yaml

# 2.0 部署无效 SurrealKV PVC
